package com.yb.guigu.pick.auth.controller;


import com.yb.guigu.pick.auth.bean.vo.request.SysPermissionCreateVo;
import com.yb.guigu.pick.auth.service.ISysPermissionService;
import com.yb.guigu.pick.core.bean.GuiguResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 姚兵
 * @since 2023-05-30
 */
@RestController
@RequestMapping("/syspermission")
public class SysPermissionController {

    @Autowired
    ISysPermissionService sysPermissionService;
    @GetMapping("/all")
    public GuiguResult list(){
        return GuiguResult.success(sysPermissionService.list());
    }



    @PostMapping("/create")
    public GuiguResult create(@RequestBody SysPermissionCreateVo sysPermissionCreateVo){

        return sysPermissionService.create(sysPermissionCreateVo);
    }
}
